package bysj.domain;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
import util.IdService;

import java.io.Serializable;
/**
 * @author 邵潇漩
 * @version 1.0  11-13-2020
 */
@Setter
@Getter
@AllArgsConstructor
public final class Department implements Comparable<Department>,Serializable{
	private Integer id;
	private String description;
	private String no;
	private String remarks;
	private School school;

	/**
	 * Constructs a <code>String</code> with all attributes
	 * in name = value format.
	 *
	 * @return a <code>String</code> representation 
	 * of this object.
	 */
	public String toString()
	{
	    final String TAB = "    ";
	    
	    String retValue = "";
	    
	    retValue = "Department ( "
	        + super.toString() + TAB
	        + "id = " + this.id + TAB
	        + "description = " + this.description + TAB
	        + "no = " + this.no + TAB
	        + "remarks = " + this.remarks + TAB
	        + "school_json = " + this.school + TAB
	        + " )";
	
	    return retValue;
	}

	@Override
	public int compareTo(Department o) {
		// TODO Auto-generated method stub
		return this.id-o.id;
	}
	
	
}
